
function verif($scope, $browser,$http) {
	$scope.account_format = /^[a-zA-Z0-9]*$/;
	$scope.password_format = /^\w*$/;
	$scope.password2_format=/^\w*$/;
	//$scope.name_format=/^[\u4e00-\u9fa5]*$/;  
	$scope.name_format=/^[\u4e00-\u9fa5]{0,}$/;
	$scope.idcard_format=/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
	$scope.email_format=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
	$scope.veryifcode_format=/^[a-zA-Z0-9]*$/;
	$scope.minvalue=false;
	function fd(){
		$scope.true1=false;
		$scope.true2=false;
		$scope.true3=false;
		$scope.true4=false;
		$scope.true5=false;
		$scope.true6=false;
	}
	fd();
	$scope.pwdchange=function(){
		$scope.password_diff =$scope.password!=$scope.password2; 
		if($scope.form.password.$valid){ 
		$scope.matchaccount=($scope.account==$scope.password);
		}
	};
	
    $scope.checked = true;	
	$scope._time = '';
	$scope.newverifycode = function(){
		$scope.random = (new Date()).getTime().toString();
	};
	$scope.msg = ['账号长度为6-16位字符','只能使用6-16位字母和数字','格式错误！！只能由数字或者字母构成','由6~16位字母或数字组成,不区分大小写 ','请填写验证码','请填写邮箱','请填写真实的身份证号码','请填写姓名','请填写密码',
				  '请填写确认密码', '格式错误，请填写真实的身份证号码', '格式错误，请填写正确的邮箱地址', '错误请，填写正确的验证码', '密码长度小于6位', '密码长度大于14位', '格式错误', '前后两次密码不一致!!',
                  '姓名格式错误,只能为中文', '长度不能小于2位', '长度不能大于13位', '该账号已经注册,请重试', '该账号可以注册'

	];
      
	 function myalert(msg){
		$scope.account = $browser.cookies()['account'];
        $scope.name =unescape($browser.cookies()['name']);
        $scope.email = $browser.cookies()['email'];
        $scope.idcard = $browser.cookies()['idcard'];
		deleteCookie("name");
		deleteCookie('account');
        deleteCookie('email');
        deleteCookie('idcard');
		deleteCookie('error');
		$scope.showHid=true;
		$scope.alertCon=msg;
	}

	var error = $browser.cookies()['error'];
	if (error && error != "") {
        switch(error){
            case "0000": myalert("验证码不正确，请重试"); break;
            case "0001": myalert("省份证号码不正确，请重试"); break;
        };
       
    };

    $scope.fetch = function () {
            $http.get('/account/verifyaccount/' + $scope.account).
			success(
				function (data, status) {
				    if (data == "False") {
				        $scope.notregedted = false;
				        $scope.notunregedted = true;
				    }
				    if (data == "True") {
				        $scope.notregedted = true;
				        $scope.notunregedted = false;
				    }

				}).
			error(function (data, status) {
			    $scope.notregedted = true;
			});
    };
}






